POV-Ray : Newsgroups : povray.general : How to display image? : Re: How to display image? Server Time
31 Jul 2024 06:23:15 EDT (-0400)
  Re: How to display image?  
From: M a r c
Date: 18 Sep 2007 03:58:28
Message: <46ef8524$1@news.povray.org>

web.46ef777c6a46897c3ccd3f470@news.povray.org...
> Thanks!
>
> Is there such a thing as a "rectangle", rather than a "box"?
just scale your box (after the pigment has been applied)to fit your image 
ratio

Say for a 800x600 image

//Camera to fit your wish of z up, y forward
camera {
  location  <      0,     -12,       0>
  sky       z
  up        z
  right     x* 1.33
  angle          7
  look_at   <      0,      0,       0>
}

//
// *******  L I G H T S *******
//

light_source {
  <0.0, 0.0, 0.0>
  color rgb <1.000, 1.000, 1.000>
  photons {
  }
  translate  <0, -15, 0>
}



#declare Image =
      texture
      {
         pigment {image_map{jpeg   "Your_image.jpg"}}
         finish {diffuse 0.8}
      }


box {
  0, 1
   texture {Image}
   translate<-.5,-.5,-.5>// to center the box around 0rigin
  scale <1.333, 1.0, 0.01> //to fit image ratio (800/600 almost =  1.333)
  //  you can multiply   by the amount you want, like : scale <1.333, 1.0, 
0.01>*10
  rotate 90.0*x  //to face camera
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.